<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

<!--表格id与lay-filter属性一致，统一定义为zmn-table-->
<table class="layui-hide" id="zmn-table" lay-filter="zmn-table" th:fragment="table">
    <thead>
    <tr>
        <th lay-data="{field:'categOne', width:180, unresize:true, align:'center'}">后台1级产品分类</th>
        <th lay-data="{field:'categTwo', unresize:true}">后台2级产品分类</th>
        <!--规定操作列置于最后-->
        <th lay-data="{field:'操作', width:280, unresize:true, align:'center'}">操作</th>
    </tr>
    </thead>
    <tbody>
    <tr th:each="item:${categOnes}">
        <td>
            <div class="layui-row">
                <span th:text="${item.categName}"></span>
                <span style="font-family:'ArialMT', 'Arial';color:#33AB9F;" th:text="${(item.toBeEffectiveRatio == null && item.ratio == null) ? '-' : ((item.toBeEffectiveRatio == null ? '-':#numbers.formatDecimal(item.toBeEffectiveRatio,1,'COMMA',2,'POINT')) + '/' + (item.ratio == null ? '-':#numbers.formatDecimal(item.ratio,1,'COMMA',2,'POINT')))}"></span>
            </div>
        </td>
        <td>
            <div class="layui-container">
                <div class="layui-row">
                    <zmn th:each="twoCategory : ${map[item.categOneId]}">
                        <div class="layui-col-md2 layui-col-sm2">
                            <span th:text="${twoCategory.categName}"></span>
                            <span th:text="${(twoCategory.toBeEffectiveRatio == null && item.ratio == null) ? '-' : ((twoCategory.toBeEffectiveRatio==null?'-':#numbers.formatDecimal(twoCategory.toBeEffectiveRatio,1,'COMMA',2,'POINT')) + '/' + (twoCategory.ratio==null?'-':#numbers.formatDecimal(twoCategory.ratio,1,'COMMA',2,'POINT')))}" style="font-family:'ArialMT', 'Arial';color:#33AB9F;"></span>
                        </div>
                    </zmn>
                </div>
            </div>
        </td>
        <td>
            <a th:if="${#authPermit.checkPermit('/channel/brand/ratio/categDetail.action?bizType='+bizType+'&priceType='+priceType)}" th:href="|/channel/brand/ratio/categDetail.action?channelId=${channelId}&brandId=${brandId}&priceType=${priceType}&bizType=${bizType}&servCategId=${servCategId}&categOneId=${item.categOneId}&categOneName=${item.categName}&servCategName=${servCategName}|" style="color: #00a0e9" text="设置分类系数">设置分类系数</a>
        </td>
    </tr>
    </tbody>
</table>
